package com.yunkaweilai.android.view.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.TextView;

import com.yunkaweilai.android.R;
import com.yunkaweilai.android.interfaces.StringInterface;


/**
 * 安全推出
 * Created by Administrator on 2016/12/22 0022.
 */

public class DelMemberLevelDialog extends Dialog{
    private TextView idTvContent;
    private TextView idTvRight;
    private String msg;
    private StringInterface stringInterface;
    private TextView idTvClose;
    private String levelid;
    public DelMemberLevelDialog(@NonNull Context context, String msg,String levelid, StringInterface stringInterface) {
        super(context, R.style.dialog);
        this.msg = msg;
        this.stringInterface = stringInterface;
        this.levelid = levelid;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_del_member);
        idTvContent = ((TextView) findViewById(R.id.id_tv_content));
        idTvClose = ((TextView) findViewById(R.id.id_tv_close));
        idTvRight = ((TextView) findViewById(R.id.id_tv_right));
        idTvContent.setText(msg);
        idTvClose.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        idTvRight.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                stringInterface.getString(levelid);
                dismiss();
            }
        });

    }

}
